﻿<!--РїВ»С—
Copyright (c) 2012 Tim Heuer

Licensed under the Microsoft Public License (Ms-PL) (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://opensource.org/licenses/Ms-PL.html

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:HDK.UI.Controls"
    xmlns:localConverter="using:HDK.UI.Converters"
    xmlns:localPrimitives="using:HDK.UI.Controls.Primitives"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ms-appx:///HDK/Themes/Styles.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
<ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Default">
            <SolidColorBrush x:Key="FlyoutBorderBrush">#FF212121</SolidColorBrush>
            <SolidColorBrush x:Key="FlyoutBackgroundBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuBorderBrush">#FF212121</SolidColorBrush>
            <SolidColorBrush x:Key="MenuBackgroundBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemBaseTextBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemBaseBackgroundBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemHoverBrush">#FFDEDEDE</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemPressedBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemPressedTextBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemHoverTextBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="MenuSeparatorStrokeBrush">#FF707070</SolidColorBrush>
            <SolidColorBrush x:Key="SettingsFlyoutHeaderBackgroundBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemForegroundThemeBrush">#FF5B2EC5</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemPointerOverThemeBrush">#FF724BCD</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemPointerPressedThemeBrush">#FF8152EF</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemBackgroundThemeBrush">#59FFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemDisabledForegroundThemeBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemBorderThemeBrush">Transparent</SolidColorBrush>
            <Thickness x:Key="RatingItemBorderThemeThickness">0.0</Thickness>
            <Color x:Key="RatingItemPointerOverThemeColor">#FF724BCD</Color>
            <Color x:Key="RatingItemPointerPressedThemeColor">#FF8152EF</Color>
        </ResourceDictionary>
        <ResourceDictionary x:Key="Light">
            <SolidColorBrush x:Key="FlyoutBorderBrush">#FF212121</SolidColorBrush>
            <SolidColorBrush x:Key="FlyoutBackgroundBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuBorderBrush">#FF212121</SolidColorBrush>
            <SolidColorBrush x:Key="MenuBackgroundBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemBaseTextBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemBaseBackgroundBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemHoverBrush">#FFDEDEDE</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemPressedBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemPressedTextBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemHoverTextBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="MenuSeparatorStrokeBrush">#FF707070</SolidColorBrush>
            <SolidColorBrush x:Key="SettingsFlyoutHeaderBackgroundBrush">LightGray</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemForegroundThemeBrush">#FF4617B4</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemPointerOverThemeBrush">#FF5F37BE</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemPointerPressedThemeBrush">#FF7241E4</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemBackgroundThemeBrush">#59000000</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemDisabledForegroundThemeBrush">#FF000000</SolidColorBrush>
            <SolidColorBrush x:Key="RatingItemBorderThemeBrush">Transparent</SolidColorBrush>
            <Thickness x:Key="RatingItemBorderThemeThickness">0.0</Thickness>
            <Color x:Key="RatingItemPointerOverThemeColor">#FF5F37BE</Color>
            <Color x:Key="RatingItemPointerPressedThemeColor">#FF7241E4</Color>
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">
            <SolidColorBrush x:Key="FlyoutBorderBrush" Color="{StaticResource SystemColorButtonTextColor}" />
            <SolidColorBrush x:Key="FlyoutBackgroundBrush" Color="{StaticResource SystemColorButtonFaceColor}" />
            <SolidColorBrush x:Key="MenuBorderBrush" Color="{StaticResource SystemColorButtonTextColor}" />
            <SolidColorBrush x:Key="MenuBackgroundBrush" Color="{StaticResource SystemColorButtonFaceColor}" />
            <SolidColorBrush x:Key="MenuItemBaseTextBrush" Color="{StaticResource SystemColorButtonTextColor}"/>
            <SolidColorBrush x:Key="MenuItemBaseBackgroundBrush" Color="{StaticResource SystemColorButtonFaceColor}" />
            <SolidColorBrush x:Key="MenuItemHoverBrush" Color="{StaticResource SystemColorHighlightColor}" />
            <SolidColorBrush x:Key="MenuItemPressedBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="MenuItemPressedTextBrush" Color="{StaticResource SystemColorButtonFaceColor}"/>
            <SolidColorBrush x:Key="MenuItemHoverTextBrush" Color="{StaticResource SystemColorButtonTextColor}"/>
            <SolidColorBrush x:Key="MenuSeparatorStrokeBrush">#FFFFFFFF</SolidColorBrush>
            <SolidColorBrush x:Key="SettingsFlyoutHeaderBackgroundBrush" Color="{StaticResource SystemColorButtonFaceColor}" />
            <SolidColorBrush x:Key="RatingItemForegroundThemeBrush" Color="{StaticResource SystemColorHighlightColor}" />
            <SolidColorBrush x:Key="RatingItemPointerOverThemeBrush" Color="{StaticResource SystemColorButtonTextColor}" />
            <SolidColorBrush x:Key="RatingItemPointerPressedThemeBrush" Color="{StaticResource SystemColorButtonTextColor}" />
            <SolidColorBrush x:Key="RatingItemBackgroundThemeBrush" Color="{StaticResource SystemColorButtonFaceColor}" />
            <SolidColorBrush x:Key="RatingItemDisabledForegroundThemeBrush" Color="{StaticResource SystemColorButtonFaceColor}" />
            <SolidColorBrush x:Key="RatingItemBorderThemeBrush" Color="{StaticResource SystemColorButtonTextColor}" />
            <Thickness x:Key="RatingItemBorderThemeThickness">1.0</Thickness>
            <!-- TODO: Need Colors for HC mode to match system resources -->
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

        
    <x:String x:Key="SettingsFlyoutHeaderTextDefault">Application Setting</x:String>

    <Style x:Key="SettingsBackButtonStyle" TargetType="Button">
        <Setter Property="MinWidth" Value="0"/>
        <Setter Property="FontFamily" Value="Segoe UI Symbol"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="26.66667"/>
        <Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
        <Setter Property="AutomationProperties.Name" Value="Back"/>
        <Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="RootGrid" Width="30" Height="30">


                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonForegroundThemeBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation
                                            Storyboard.TargetName="ArrowGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0"/>
                                        <DoubleAnimation
                                            Storyboard.TargetName="NormalGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation
                                            Storyboard.TargetName="FocusVisualWhite"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0"/>
                                        <DoubleAnimation
                                            Storyboard.TargetName="FocusVisualBlack"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid Margin="-3,-5,0,0">
                            <TextBlock x:Name="BackgroundGlyph" Text="&#xE0D4;" Foreground="{StaticResource BackButtonBackgroundThemeBrush}"/>
                            <TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonSnappedGlyph}" Foreground="{StaticResource BackButtonForegroundThemeBrush}"/>
                            <TextBlock x:Name="ArrowGlyph" Text="&#xE0C4;" Foreground="{StaticResource BackButtonPressedForegroundThemeBrush}" Opacity="0"/>
                        </Grid>
                        <Rectangle
                            x:Name="FocusVisualWhite"
                            IsHitTestVisible="False"
                            Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                            StrokeEndLineCap="Square"
                            StrokeDashArray="1,1"
                            Opacity="0"
                            StrokeDashOffset="1.5"/>
                        <Rectangle
                            x:Name="FocusVisualBlack"
                            IsHitTestVisible="False"
                            Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                            StrokeEndLineCap="Square"
                            StrokeDashArray="1,1"
                            Opacity="0"
                            StrokeDashOffset="0.5"/>


                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:SettingsFlyout">
        <Setter Property="Background" Value="{StaticResource ApplicationPageBackgroundThemeBrush}" />
        <Setter Property="HeaderBrush" Value="{StaticResource SettingsFlyoutHeaderBackgroundBrush}" />
        <Setter Property="HeaderText" Value="{StaticResource SettingsFlyoutHeaderTextDefault}" />
        <Setter Property="MaxWidth" Value="646" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:SettingsFlyout">
                    <Border BorderBrush="Black" BorderThickness="1,0,0,0" VerticalAlignment="Stretch">
                        <Grid Background="{TemplateBinding Background}" VerticalAlignment="Stretch" >
                            <!-- Root grid definition -->
                            <Grid.RowDefinitions>
                                <RowDefinition Height="80" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>


                            <!-- Header area for panel -->
                            <Grid Background="{TemplateBinding HeaderBrush}" Grid.Row="0">


                                <Grid Margin="40,35,40,13">


                                    <Grid.Transitions>
                                        <TransitionCollection>
                                            <EntranceThemeTransition FromHorizontalOffset="100" />
                                        </TransitionCollection>
                                    </Grid.Transitions>


                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="30" />
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="30"/>
                                    </Grid.ColumnDefinitions>


                                    <Button x:Name="SettingsBackButton" Margin="0,0,0,0" Grid.Column="0" Style="{StaticResource SettingsBackButtonStyle}" HorizontalAlignment="Left" />


                                    <TextBlock TextTrimming="WordEllipsis" Margin="10,-2,0,0" Grid.Column="1" FontFamily="Segoe UI" FontWeight="SemiLight" FontSize="24.6667" Text="{TemplateBinding HeaderText}" HorizontalAlignment="Left" />


                                    <Image Source="{TemplateBinding SmallLogoImageSource}" HorizontalAlignment="Right" Grid.Column="2" Margin="0,0,0,0" />


                                </Grid>


                            </Grid>


                            <!-- Settings Panel Content -->
                            <Grid Grid.Row="1" Margin="33,22,40,0" VerticalAlignment="Top" HorizontalAlignment="Left">
                                <Grid.Transitions>
                                    <TransitionCollection>
                                        <EntranceThemeTransition FromHorizontalOffset="150" />
                                    </TransitionCollection>
                                </Grid.Transitions>
                                <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                            </Grid>


                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="local:LiveTile">
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LiveTile">
                    <Grid Background="{TemplateBinding Background}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Canvas x:Name="Scroller" DataContext="{x:Null}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <StackPanel x:Name="Stack" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5">
                            	<StackPanel.RenderTransform>
                            		<TranslateTransform x:Name="Translate" Y="0"/>
                            	</StackPanel.RenderTransform>
                                <ContentPresenter x:Name="Current"
                                                  DataContext="{x:Null}"
                                                  Content="{Binding}" 
                                                    ContentTemplate="{TemplateBinding ItemTemplate}" />
                                <ContentPresenter  x:Name="Next" 
                                                    DataContext="{x:Null}"
                                                   Content="{Binding}" 
                                                    ContentTemplate="{TemplateBinding ItemTemplate}" />
                            </StackPanel>
                        </Canvas>
                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

<SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
    <LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#F3F3F3" Offset="0"/>
        <GradientStop Color="#EBEBEB" Offset="0.5"/>
        <GradientStop Color="#DDDDDD" Offset="0.5"/>
        <GradientStop Color="#CDCDCD" Offset="1"/>
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="TabItemHotBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#EAF6FD" Offset="0.15"/>
        <GradientStop Color="#D9F0FC" Offset=".5"/>
        <GradientStop Color="#BEE6FD" Offset=".5"/>
        <GradientStop Color="#A7D9F5" Offset="1"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9"/>
    <SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1"/>
    <SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4"/>
    <SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA"/>
    <LinearGradientBrush x:Key="NormalBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFEFEFE" Offset="0"/>
        <GradientStop Color="#FFDADADA" Offset="1"/>
        <GradientStop Color="#FFECECEC" Offset="0.5"/>
    </LinearGradientBrush>
  
    <Style TargetType="local:BreadcrumbBar">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
        <Setter Property="Background" Value="#F9F9F9"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:BreadcrumbBar">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0"/>
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0" Height="Auto"/>
                            <RowDefinition x:Name="RowDefinition1" Height="*"/>
                        </Grid.RowDefinitions>
                        <!--<TabPanel x:Name="HeaderPanel" Grid.Column="0" IsItemsHost="true" Margin="0,2,2,0" Grid.Row="0" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1" Height="Auto"/>-->
                        <Border x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" Canvas.ZIndex="100">
                            <ItemsPresenter x:Name="PART_SelectedContentHost" Margin="{TemplateBinding Padding}" />
                        </Border>
                        <Border BorderBrush="#FF053061" BorderThickness="0,2,0,0" HorizontalAlignment="Stretch" Height="Auto" Grid.Row="0" VerticalAlignment="Stretch"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="local:BreadcrumbBarItem">
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding Title}" />
                </DataTemplate>
            </Setter.Value>
        </Setter>

    </Style>

    <Style TargetType="local:BreadcrumbBarItem">
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="Padding" Value="6,1,6,1"/>
        <Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
        <Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>      
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:BreadcrumbBarItem">
                    <Grid Margin="-14,0,0,0">
                        <Grid x:Name="Bd">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="15"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="14"/>
                            </Grid.ColumnDefinitions>
                            <Path x:Name="BackArrowPath" Data="M46.397982,22.797102 L59.852642,11.058328 46.686983,-0.13916315 61.090156,-0.12534663 61.090156,22.81367 z" Fill="{StaticResource NormalBrush}" HorizontalAlignment="Right" Stretch="Fill" Width="15.692" Canvas.ZIndex="100" d:LayoutOverrides="GridBox" Margin="0,-0.271,-0.3,-1" Stroke="{x:Null}" />
                            <Border BorderBrush="{x:Null}" Background="{StaticResource NormalBrush}" Canvas.ZIndex="50" Grid.Column="1" Margin="-1,0,0,0"/>
                            <Path x:Name="ArrowPath" Data="M46.800634,-0.12534663 L60.746387,10.983697 46.84297,22.41667" Fill="{StaticResource NormalBrush}" HorizontalAlignment="Right" Stretch="Fill" Stroke="#FFB7B7B7" Width="14.945" Grid.Column="2" d:LayoutOverrides="GridBox" Margin="0,-0.125,0,-0.245" Canvas.ZIndex="100"/>
                            <ContentPresenter x:Name="Content" ContentTemplate="{TemplateBinding ContentTemplate}" Margin="10,2,5,1"  Canvas.ZIndex="150" Grid.Column="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                            <Path x:Name="HoverBackArrowPath" Data="M46.397982,22.797102 L59.852642,11.058328 46.686983,-0.13916315 61.090156,-0.12534663 61.090156,22.81367 z" Fill="Black" HorizontalAlignment="Right" Stretch="Fill" Width="15.692" Canvas.ZIndex="100" d:LayoutOverrides="GridBox" Margin="0,-0.271,-0.3,-1" Stroke="{x:Null}" Opacity="0"/>
                            <Border x:Name="HoverBorder" BorderBrush="{x:Null}" Background="Black" Canvas.ZIndex="50" Grid.Column="1" Margin="-1,0,0,0" Opacity="0"/>
                            <Path x:Name="HoverArrowPath" Data="M46.800634,-0.12534663 L60.746387,10.983697 46.84297,22.41667" Fill="Black" HorizontalAlignment="Right" Stretch="Fill" Stroke="#FFB7B7B7" Width="14.945" Grid.Column="2" Margin="0,-0.125,0,-0.245" Canvas.ZIndex="100" d:LayoutOverrides="GridBox" Opacity="0"/>
                            <Path x:Name="SelectedBackArrowPath" Data="M46.397982,22.797102 L59.852642,11.058328 46.686983,-0.13916315 61.090156,-0.12534663 61.090156,22.81367 z" Fill="Black" HorizontalAlignment="Right" Stretch="Fill" Width="15.692" Canvas.ZIndex="100" Margin="0,-0.271,-0.3,-1" Stroke="{x:Null}" Opacity="0" d:LayoutOverrides="GridBox"/>
                            <Border x:Name="SelectedBorder" BorderBrush="{x:Null}" Background="Black" Canvas.ZIndex="50" Grid.Column="1" Margin="-1,0,0,0" Opacity="0"/>
                            <Path x:Name="SelectedArrowPath" Data="M46.800634,-0.12534663 L60.746387,10.983697 46.84297,22.41667" Fill="Black" HorizontalAlignment="Right" Stretch="Fill" Stroke="#FFB7B7B7" Width="14.945" Grid.Column="2" Margin="0,-0.125,0,-0.245" Canvas.ZIndex="100" Opacity="0" d:LayoutOverrides="GridBox"/>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <localConverter:DebugConverter x:Name="DebugConverter" />

    <Style TargetType="local:AdvancedSemanticZoom">
        <Setter Property="BreadcrumbItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Border HorizontalAlignment="Center" VerticalAlignment="Center" Margin="14,0,10,0">
                            <!--<c:Bitmap Source="..\Images\divider.png" />-->
                        </Border>
                        <Button Content="{Binding}" VerticalAlignment="Center" CommandParameter="{Binding}" Click="ClickHandler"/>
                    </StackPanel>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="FilterListItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Button Content="{Binding DisplayText}" CommandParameter="{Binding}" Click="ClickHandler">
                    </Button>
                </DataTemplate>
            </Setter.Value>
        </Setter>        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AdvancedSemanticZoom">
                    <StackPanel x:Name="PART_ASZContainer" Background="{TemplateBinding Background}" Orientation="Vertical">
                        <ItemsControl x:Name="PART_Breadcrumb" Margin="30,15,30,0" FontFamily="Cambria" FontSize="20" 
                                      ItemsSource="{TemplateBinding FilterStack}"
                                      ItemTemplate="{TemplateBinding BreadcrumbItemTemplate}"
                                      >
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal"/>
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </ItemsControl>

                        <Grid x:Name="PART_FiltersGrid" Grid.Row="1" Margin="30,15,0,30" Background="Lavender">
                            <ListBox x:Name="FiltersList" Background="DarkGray" ItemsSource="{TemplateBinding SubFilters}" FontFamily="Cambria" FontSize="22"
                                     ItemTemplate="{TemplateBinding FilterListItemTemplate}">
                                <ListBox.ItemContainerStyle>
                                    <Style TargetType="ListBoxItem">
                                        <Setter Property="Margin" Value="0,0,30,0" />
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="ListBoxItem">
                                                    <ContentPresenter />
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </ListBox.ItemContainerStyle>
                            </ListBox>
                        </Grid>
                    </StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
